﻿package jiyun.com.yiyanmeng.http;


import java.util.List;


import bean.CodeBean;
import bean.GuangGaoBean;
import bean.LoginBean;
import bean.LunTanJiYanBean;
import bean.LunTanOffRecyBean;
import bean.LunTanSchoolNewsBean;
import bean.LunTanSchoolTabBean;

import bean.AllBean;
import bean.BooksBean;
import bean.BooksDatilBean;
import bean.CodeBean;
import bean.GuangGaoBean;
import bean.KechengBannerBean;
import bean.LoginBean;
import bean.Loginby_phonecodeBean;

import bean.RegBean;
import bean.ResultBean;
import bean.VideoBean;
import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;

/**
 * Created by Windows on 2019/11/4.
 */

public interface MySerivce {
    String base_URL="https://app.yiyanmeng.com/index.php/";
    //登录
    @FormUrlEncoded
    @POST("login/login")
    Observable<ResultBean<LoginBean>> login(@Field("name") String name,@Field("pass") String pass);
    //广告
    @POST("index/get_advering_info")
    Observable<ResultBean<GuangGaoBean>> guangGao();
    //获取验证码
    @FormUrlEncoded
    @POST("Paywx/massage")
    Observable<ResultBean<CodeBean>> yanzhengma(@Field("phnoe") String phone,@Field("type") String type);
    //注册
    @FormUrlEncoded
    @POST("login/login_zhuce")
    Observable<ResultBean<RegBean>> reg(@Field("phnoe") String phone, @Field("pass") String password,@Field("code") String code,@Field("type") String type);

    //论坛 学校  tab栏分类数据
    @GET("forumsc/type_select")
    Observable<LunTanSchoolTabBean> sctabbean();
    //学校 历年复试真题
    @FormUrlEncoded
    @POST("forumsc/article_select")
    Observable<ResultBean<List<LunTanSchoolNewsBean>>> newsbean(@Field("id") int id, @Field("p") int page);
    //论坛 论坛  官方论坛数据
    @GET("forum/official_index")
    Observable<LunTanOffRecyBean> offbean();
    //论坛 论坛  经验论坛数据
    @GET("forumjy/forum_jy_index")
    Observable<LunTanJiYanBean> janyanbean();


    //手机号验证码登录
    @FormUrlEncoded
    @POST("login/login")
    Observable<ResultBean<Loginby_phonecodeBean>> loginby_phonecode(@Field("type") String type, @Field("phnoe") String phnoe,@Field("code") String code);

    //找回密码  login/edit_phnoe
    @FormUrlEncoded
    @POST("login/edit_phnoe")
    Observable<ResponseBody> findpass(@Field("phnoe") String phnoe, @Field("y_pass") String y_pass, @Field("c_pass") String c_pass, @Field("code") String code);

    //图书
    //https://app.yiyanmeng.com/index.php/
    @GET("shop/get_shop_list")
    Observable<ResultBean<List<BooksBean>>>getBook();

    //https://app.yiyanmeng.com/index.php/kecheng/ke_index_list
    @GET("kecheng/ke_index_list")
    Observable<ResultBean<VideoBean>>getVideo();

    //https://app.yiyanmeng.com/index.php/
    @POST("shop/get_shop_and_vedio_list")
    @FormUrlEncoded
    Observable<ResultBean<AllBean>> getAll(@Field("start") int start, @Field("end") int end);


    //商品详情
    @POST("Shop/shop_xiang_qing")
    @FormUrlEncoded
    Observable<ResultBean<BooksDatilBean>> getBooksDatil(@Field("id") int id);

    Observable<AllBean> getAll();

    //课程
    @POST("kecheng/ke_index_list")
    Observable<ResultBean<KechengBannerBean>> kechengbanner();




}
